home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / tool chest / development kits / hypercard related / hypercard instance variables / instance variables / cards.xml < prev    next >
Encoding:
Text File  |  1993-04-01  |  26.8 KB  |  842 lines

  1. card_4916.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>4916</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>2801</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>2</id>
  15.         <text>
  16.  
  17. Happy Scripting !
  18. </text>
  19.     </content>
  20.     <name></name>
  21.     <script></script>
  22. </card>
  23.  
  24.  
  25. card_8462.xml
  26. <?xml version="1.0" encoding="utf-8" ?>
  27. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  28. <card>
  29.     <id>8462</id>
  30.     <filler1>0</filler1>
  31.     <cantDelete> <false /> </cantDelete>
  32.     <showPict> <true /> </showPict>
  33.     <dontSearch> <false /> </dontSearch>
  34.     <owner>2801</owner>
  35.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  36.     <content>
  37.         <layer>background</layer>
  38.         <id>2</id>
  39.         <text>Bonus functions:
  40.  
  41. ‚Ä¢ Does this object have this variable?
  42.  
  43. ‚Ä¢ List all variables for an object.
  44.  
  45. ‚Ä¢ Remove a variable from an object.
  46.        (only to save space)
  47. </text>
  48.     </content>
  49.     <name></name>
  50.     <script></script>
  51. </card>
  52.  
  53.  
  54. card_5416.xml
  55. <?xml version="1.0" encoding="utf-8" ?>
  56. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  57. <card>
  58.     <id>5416</id>
  59.     <filler1>0</filler1>
  60.     <cantDelete> <false /> </cantDelete>
  61.     <showPict> <true /> </showPict>
  62.     <dontSearch> <false /> </dontSearch>
  63.     <owner>2801</owner>
  64.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  65.     <content>
  66.         <layer>background</layer>
  67.         <id>2</id>
  68.         <text>How to install:
  69.      Copy the stack script of this stack and put it into your stack.
  70.  
  71.      Call allowInstVars once from each background in your stack to initialize.  When you make a new background, don't forget to call it from there before using instance variables.
  72. </text>
  73.     </content>
  74.     <name></name>
  75.     <script></script>
  76. </card>
  77.  
  78.  
  79. card_4497.xml
  80. <?xml version="1.0" encoding="utf-8" ?>
  81. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  82. <card>
  83.     <id>4497</id>
  84.     <filler1>0</filler1>
  85.     <cantDelete> <false /> </cantDelete>
  86.     <showPict> <true /> </showPict>
  87.     <dontSearch> <false /> </dontSearch>
  88.     <owner>2801</owner>
  89.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  90.     <content>
  91.         <layer>background</layer>
  92.         <id>2</id>
  93.         <text><span class="style1">ommon mistakes:
  94.  
  95. ‚Ä¢  the id of button "Next"      5
  96.     the id of this card               card id 5132
  97. must say:   the </span><span class="style4">short</span><span class="style1"> id of this card
  98.  
  99. ‚Ä¢  getting the value from the wrong object. 
  100.     forgetting to change the ID part of call.</span></text>
  101.     </content>
  102.     <name></name>
  103.     <script></script>
  104. </card>
  105.  
  106.  
  107. card_8322.xml
  108. <?xml version="1.0" encoding="utf-8" ?>
  109. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  110. <card>
  111.     <id>8322</id>
  112.     <filler1>0</filler1>
  113.     <cantDelete> <false /> </cantDelete>
  114.     <showPict> <true /> </showPict>
  115.     <dontSearch> <false /> </dontSearch>
  116.     <owner>2801</owner>
  117.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  118.     <part>
  119.         <id>1</id>
  120.         <type>button</type>
  121.         <visible> <true /> </visible>
  122.         <reserved5> 0 </reserved5>
  123.         <reserved4> 0 </reserved4>
  124.         <reserved3> 0 </reserved3>
  125.         <reserved2> 0 </reserved2>
  126.         <reserved1> 0 </reserved1>
  127.         <enabled> <true /> </enabled>
  128.         <rect>
  129.             <left>324</left>
  130.             <top>77</top>
  131.             <right>372</right>
  132.             <bottom>128</bottom>
  133.         </rect>
  134.         <style>rectangle</style>
  135.         <showName> <true /> </showName>
  136.         <highlight> <false /> </highlight>
  137.         <autoHighlight> <false /> </autoHighlight>
  138.         <sharedHighlight> <true /> </sharedHighlight>
  139.         <family>0</family>
  140.         <titleWidth>0</titleWidth>
  141.         <icon>3400</icon>
  142.         <textAlign>center</textAlign>
  143.         <font>Chicago</font>
  144.         <textSize>12</textSize>
  145.         <textStyle>plain</textStyle>
  146.         <name>Engine</name>
  147.         <script>on mouseUp
  148. -- put my current direction into the message box
  149. put getVar(cd,the id of me,"direction")
  150. end mouseUp
  151. </script>
  152.     </part>
  153.     <part>
  154.         <id>2</id>
  155.         <type>field</type>
  156.         <visible> <true /> </visible>
  157.         <dontWrap> <false /> </dontWrap>
  158.         <dontSearch> <false /> </dontSearch>
  159.         <sharedText> <false /> </sharedText>
  160.         <fixedLineHeight> <false /> </fixedLineHeight>
  161.         <autoTab> <false /> </autoTab>
  162.         <lockText> <false /> </lockText>
  163.         <rect>
  164.             <left>17</left>
  165.             <top>132</top>
  166.             <right>485</right>
  167.             <bottom>280</bottom>
  168.         </rect>
  169.         <style>shadow</style>
  170.         <autoSelect> <false /> </autoSelect>
  171.         <showLines> <false /> </showLines>
  172.         <wideMargins> <true /> </wideMargins>
  173.         <multipleLines> <false /> </multipleLines>
  174.         <reservedFamily> 0 </reservedFamily>
  175.         <titleWidth>0</titleWidth>
  176.         <icon>0</icon>
  177.         <textAlign>left</textAlign>
  178.         <font>Courier</font>
  179.         <textSize>14</textSize>
  180.         <textStyle>plain</textStyle>
  181.         <textHeight>18</textHeight>
  182.         <name></name>
  183.         <script></script>
  184.     </part>
  185.     <content>
  186.         <layer>background</layer>
  187.         <id>2</id>
  188.         <text>Example:
  189. </text>
  190.     </content>
  191.     <content>
  192.         <layer>background</layer>
  193.         <id>21</id>
  194.         <text>
  195. {speed{1{3}speed}1}
  196. {direction{1{west}direction}1}</text>
  197.     </content>
  198.     <content>
  199.         <layer>card</layer>
  200.         <id>2</id>
  201.         <text><span class="style1">putVar  cd,the id of cd btn "Engine","speed",3
  202.  
  203.  put getVar(cd,the id of cd btn "Engine","speed")
  204.  
  205. </span><span class="style3">
  206. </span><span class="style1"> putVar cd,the id of cd btn "Engine","direction","west"
  207.  
  208.  put getVar(cd,the id of cd btn "Engine","direction")
  209. </span></text>
  210.     </content>
  211.     <name></name>
  212.     <script>on closeCard
  213. hide msg box
  214. end closeCard</script>
  215. </card>
  216.  
  217.  
  218. card_3928.xml
  219. <?xml version="1.0" encoding="utf-8" ?>
  220. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  221. <card>
  222.     <id>3928</id>
  223.     <filler1>0</filler1>
  224.     <cantDelete> <false /> </cantDelete>
  225.     <showPict> <true /> </showPict>
  226.     <dontSearch> <false /> </dontSearch>
  227.     <owner>2801</owner>
  228.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  229.     <content>
  230.         <layer>background</layer>
  231.         <id>2</id>
  232.         <text>The calls have an optional argument, a card ID.  This is used to access to variables on another card.  Use it if you are showing one card and talking about variables in an object that is on another card.
  233.  
  234. ID of object can come from saying "the short id of me" at the call.  Or keep track of the IDs of objects and call from anywhere.</text>
  235.     </content>
  236.     <name></name>
  237.     <script></script>
  238. </card>
  239.  
  240.  
  241. card_9024.xml
  242. <?xml version="1.0" encoding="utf-8" ?>
  243. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  244. <card>
  245.     <id>9024</id>
  246.     <filler1>0</filler1>
  247.     <cantDelete> <false /> </cantDelete>
  248.     <showPict> <true /> </showPict>
  249.     <dontSearch> <false /> </dontSearch>
  250.     <owner>2801</owner>
  251.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  252.     <content>
  253.         <layer>background</layer>
  254.         <id>2</id>
  255.         <text>(examples:)
  256.  
  257. getVar (cdBk, myID, variable, cardID)
  258.  
  259. getVar ("cd",the short id of me, "Favorite")
  260.  
  261. getVar ("cd", 1, "Favorite")</text>
  262.     </content>
  263.     <name></name>
  264.     <script></script>
  265. </card>
  266.  
  267.  
  268. card_6694.xml
  269. <?xml version="1.0" encoding="utf-8" ?>
  270. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  271. <card>
  272.     <id>6694</id>
  273.     <filler1>0</filler1>
  274.     <cantDelete> <false /> </cantDelete>
  275.     <showPict> <true /> </showPict>
  276.     <dontSearch> <false /> </dontSearch>
  277.     <owner>2801</owner>
  278.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  279.     <part>
  280.         <id>1</id>
  281.         <type>button</type>
  282.         <visible> <true /> </visible>
  283.         <reserved5> 0 </reserved5>
  284.         <reserved4> 0 </reserved4>
  285.         <reserved3> 0 </reserved3>
  286.         <reserved2> 0 </reserved2>
  287.         <reserved1> 0 </reserved1>
  288.         <enabled> <true /> </enabled>
  289.         <rect>
  290.             <left>352</left>
  291.             <top>3</top>
  292.             <right>420</right>
  293.             <bottom>27</bottom>
  294.         </rect>
  295.         <style>transparent</style>
  296.         <showName> <false /> </showName>
  297.         <highlight> <false /> </highlight>
  298.         <autoHighlight> <false /> </autoHighlight>
  299.         <sharedHighlight> <true /> </sharedHighlight>
  300.         <family>0</family>
  301.         <titleWidth>0</titleWidth>
  302.         <icon>0</icon>
  303.         <textAlign>center</textAlign>
  304.         <font>Chicago</font>
  305.         <textSize>12</textSize>
  306.         <textStyle>plain</textStyle>
  307.         <name>card btn</name>
  308.         <script>on mouseUp
  309. -- Test case
  310. --put the id of me
  311. --exit mouseUp
  312.  
  313. repeat with ii = 1 to 10
  314. put ii&",foo baz" into val
  315. putVar "cd",the id of me,"Favo,rite",val
  316. put getVar("cd",the id of me,"Favo,rite")
  317. end repeat
  318. end mouseUp</script>
  319.     </part>
  320.     <content>
  321.         <layer>background</layer>
  322.         <id>2</id>
  323.         <text>Calling sequence:
  324. allowInstVars  -- call it once per 
  325.                                 background to initialize
  326. (examples:)
  327. putVar cdBk, myID, variable, value, cardID
  328.  
  329. putVar "cd", the id of me, "Favorite", true
  330.  
  331. putVar "cd", 1, "Favorite", true
  332.  
  333.  
  334. </text>
  335.     </content>
  336.     <name></name>
  337.     <script></script>
  338. </card>
  339.  
  340.  
  341. card_3791.xml
  342. <?xml version="1.0" encoding="utf-8" ?>
  343. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  344. <card>
  345.     <id>3791</id>
  346.     <filler1>0</filler1>
  347.     <cantDelete> <false /> </cantDelete>
  348.     <showPict> <true /> </showPict>
  349.     <dontSearch> <false /> </dontSearch>
  350.     <owner>2801</owner>
  351.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  352.     <content>
  353.         <layer>background</layer>
  354.         <id>2</id>
  355.         <text>The variables are stored in a hidden background field that holds a "dictionary".
  356.  
  357. The dictionary will map:
  358.  
  359. cd or bk, variable name, id of object
  360.            into a value</text>
  361.     </content>
  362.     <name></name>
  363.     <script></script>
  364. </card>
  365.  
  366.  
  367. card_7940.xml
  368. <?xml version="1.0" encoding="utf-8" ?>
  369. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  370. <card>
  371.     <id>7940</id>
  372.     <filler1>0</filler1>
  373.     <cantDelete> <false /> </cantDelete>
  374.     <showPict> <true /> </showPict>
  375.     <dontSearch> <false /> </dontSearch>
  376.     <owner>2801</owner>
  377.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  378.     <content>
  379.         <layer>background</layer>
  380.         <id>2</id>
  381.         <text>Exceptions:
  382.  
  383. >  Stack itself may not have instance variables (but cards and backgrounds can)
  384.  
  385.  >  Total length cannot be greater than 32K. That is the total length of values of all instance variables for the objects on one card or for the shared objects in one background.</text>
  386.     </content>
  387.     <name></name>
  388.     <script></script>
  389. </card>
  390.  
  391.  
  392. card_7689.xml
  393. <?xml version="1.0" encoding="utf-8" ?>
  394. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  395. <card>
  396.     <id>7689</id>
  397.     <filler1>0</filler1>
  398.     <cantDelete> <false /> </cantDelete>
  399.     <showPict> <true /> </showPict>
  400.     <dontSearch> <false /> </dontSearch>
  401.     <owner>2801</owner>
  402.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  403.     <content>
  404.         <layer>background</layer>
  405.         <id>2</id>
  406.         <text>Exceptions:
  407.  
  408. >  May not have { or } in the value or in the name.  Commas are fine.
  409.  
  410. >  No variables for background fields that are not shared.  It's ambiguous.  Are the variables shared by many cards like the field?  Or do they belong to just this card like the text?</text>
  411.     </content>
  412.     <name></name>
  413.     <script></script>
  414. </card>
  415.  
  416.  
  417. card_9254.xml
  418. <?xml version="1.0" encoding="utf-8" ?>
  419. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  420. <card>
  421.     <id>9254</id>
  422.     <filler1>0</filler1>
  423.     <cantDelete> <false /> </cantDelete>
  424.     <showPict> <true /> </showPict>
  425.     <dontSearch> <false /> </dontSearch>
  426.     <owner>2801</owner>
  427.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  428.     <part>
  429.         <id>1</id>
  430.         <type>field</type>
  431.         <visible> <true /> </visible>
  432.         <dontWrap> <false /> </dontWrap>
  433.         <dontSearch> <false /> </dontSearch>
  434.         <sharedText> <false /> </sharedText>
  435.         <fixedLineHeight> <false /> </fixedLineHeight>
  436.         <autoTab> <false /> </autoTab>
  437.         <lockText> <true /> </lockText>
  438.         <rect>
  439.             <left>319</left>
  440.             <top>196</top>
  441.             <right>412</right>
  442.             <bottom>319</bottom>
  443.         </rect>
  444.         <style>shadow</style>
  445.         <autoSelect> <false /> </autoSelect>
  446.         <showLines> <false /> </showLines>
  447.         <wideMargins> <false /> </wideMargins>
  448.         <multipleLines> <false /> </multipleLines>
  449.         <reservedFamily> 0 </reservedFamily>
  450.         <titleWidth>0</titleWidth>
  451.         <icon>0</icon>
  452.         <textAlign>left</textAlign>
  453.         <font>Symbol</font>
  454.         <textSize>24</textSize>
  455.         <textStyle>plain</textStyle>
  456.         <textHeight>32</textHeight>
  457.         <name></name>
  458.         <script></script>
  459.     </part>
  460.     <part>
  461.         <id>2</id>
  462.         <type>field</type>
  463.         <visible> <true /> </visible>
  464.         <dontWrap> <false /> </dontWrap>
  465.         <dontSearch> <false /> </dontSearch>
  466.         <sharedText> <false /> </sharedText>
  467.         <fixedLineHeight> <false /> </fixedLineHeight>
  468.         <autoTab> <false /> </autoTab>
  469.         <lockText> <true /> </lockText>
  470.         <rect>
  471.             <left>351</left>
  472.             <top>196</top>
  473.             <right>438</right>
  474.             <bottom>319</bottom>
  475.         </rect>
  476.         <style>shadow</style>
  477.         <autoSelect> <false /> </autoSelect>
  478.         <showLines> <false /> </showLines>
  479.         <wideMargins> <false /> </wideMargins>
  480.         <multipleLines> <false /> </multipleLines>
  481.         <reservedFamily> 0 </reservedFamily>
  482.         <titleWidth>0</titleWidth>
  483.         <icon>0</icon>
  484.         <textAlign>left</textAlign>
  485.         <font>Symbol</font>
  486.         <textSize>24</textSize>
  487.         <textStyle>plain</textStyle>
  488.         <textHeight>32</textHeight>
  489.         <name></name>
  490.         <script></script>
  491.     </part>
  492.     <part>
  493.         <id>3</id>
  494.         <type>field</type>
  495.         <visible> <true /> </visible>
  496.         <dontWrap> <false /> </dontWrap>
  497.         <dontSearch> <false /> </dontSearch>
  498.         <sharedText> <false /> </sharedText>
  499.         <fixedLineHeight> <false /> </fixedLineHeight>
  500.         <autoTab> <false /> </autoTab>
  501.         <lockText> <true /> </lockText>
  502.         <rect>
  503.             <left>381</left>
  504.             <top>196</top>
  505.             <right>468</right>
  506.             <bottom>319</bottom>
  507.         </rect>
  508.         <style>shadow</style>
  509.         <autoSelect> <false /> </autoSelect>
  510.         <showLines> <false /> </showLines>
  511.         <wideMargins> <false /> </wideMargins>
  512.         <multipleLines> <false /> </multipleLines>
  513.         <reservedFamily> 0 </reservedFamily>
  514.         <titleWidth>0</titleWidth>
  515.         <icon>0</icon>
  516.         <textAlign>left</textAlign>
  517.         <font>Symbol</font>
  518.         <textSize>24</textSize>
  519.         <textStyle>plain</textStyle>
  520.         <textHeight>32</textHeight>
  521.         <name></name>
  522.         <script></script>
  523.     </part>
  524.     <part>
  525.         <id>4</id>
  526.         <type>field</type>
  527.         <visible> <true /> </visible>
  528.         <dontWrap> <false /> </dontWrap>
  529.         <dontSearch> <false /> </dontSearch>
  530.         <sharedText> <false /> </sharedText>
  531.         <fixedLineHeight> <false /> </fixedLineHeight>
  532.         <autoTab> <false /> </autoTab>
  533.         <lockText> <true /> </lockText>
  534.         <rect>
  535.             <left>422</left>
  536.             <top>196</top>
  537.             <right>510</right>
  538.             <bottom>319</bottom>
  539.         </rect>
  540.         <style>shadow</style>
  541.         <autoSelect> <false /> </autoSelect>
  542.         <showLines> <false /> </showLines>
  543.         <wideMargins> <false /> </wideMargins>
  544.         <multipleLines> <false /> </multipleLines>
  545.         <reservedFamily> 0 </reservedFamily>
  546.         <titleWidth>0</titleWidth>
  547.         <icon>0</icon>
  548.         <textAlign>left</textAlign>
  549.         <font>Symbol</font>
  550.         <textSize>24</textSize>
  551.         <textStyle>plain</textStyle>
  552.         <textHeight>32</textHeight>
  553.         <name></name>
  554.         <script></script>
  555.     </part>
  556.     <part>
  557.         <id>5</id>
  558.         <type>button</type>
  559.         <visible> <true /> </visible>
  560.         <reserved5> 0 </reserved5>
  561.         <reserved4> 0 </reserved4>
  562.         <reserved3> 0 </reserved3>
  563.         <reserved2> 0 </reserved2>
  564.         <reserved1> 0 </reserved1>
  565.         <enabled> <true /> </enabled>
  566.         <rect>
  567.             <left>16</left>
  568.             <top>258</top>
  569.             <right>116</right>
  570.             <bottom>280</bottom>
  571.         </rect>
  572.         <style>roundrect</style>
  573.         <showName> <true /> </showName>
  574.         <highlight> <false /> </highlight>
  575.         <autoHighlight> <false /> </autoHighlight>
  576.         <sharedHighlight> <true /> </sharedHighlight>
  577.         <family>0</family>
  578.         <titleWidth>0</titleWidth>
  579.         <icon>0</icon>
  580.         <textAlign>center</textAlign>
  581.         <font>Chicago</font>
  582.         <textSize>12</textSize>
  583.         <textStyle>plain</textStyle>
  584.         <name>Remember</name>
  585.         <script>-- An example of how to use Instance Variables.  This script
  586. -- saves the location of four card fields.  The location
  587. -- is saved as a variable belonging to the field itself.
  588.  
  589. on mouseUp
  590. -- save the location of each card field
  591. repeat with ii = 1 to 4
  592. put the ID of card fld ii into myID
  593. -- save the loc in the field's variable called "old location"
  594. putVar cd, myID, "old location", the loc of card fld ii
  595. end repeat
  596. end mouseUp
  597.  
  598.  
  599. on mouseStillDown
  600. -- do not allow this button itself to be dragged
  601. end mouseStillDown</script>
  602.     </part>
  603.     <part>
  604.         <id>6</id>
  605.         <type>button</type>
  606.         <visible> <true /> </visible>
  607.         <reserved5> 0 </reserved5>
  608.         <reserved4> 0 </reserved4>
  609.         <reserved3> 0 </reserved3>
  610.         <reserved2> 0 </reserved2>
  611.         <reserved1> 0 </reserved1>
  612.         <enabled> <true /> </enabled>
  613.         <rect>
  614.             <left>17</left>
  615.             <top>286</top>
  616.             <right>117</right>
  617.             <bottom>308</bottom>
  618.         </rect>
  619.         <style>roundrect</style>
  620.         <showName> <true /> </showName>
  621.         <highlight> <false /> </highlight>
  622.         <autoHighlight> <false /> </autoHighlight>
  623.         <sharedHighlight> <true /> </sharedHighlight>
  624.         <family>0</family>
  625.         <titleWidth>0</titleWidth>
  626.         <icon>0</icon>
  627.         <textAlign>center</textAlign>
  628.         <font>Chicago</font>
  629.         <textSize>12</textSize>
  630.         <textStyle>plain</textStyle>
  631.         <name>Jump Back</name>
  632.         <script>-- An example of how to use Instance Variables.  This script
  633. -- retrieves the location of four card fields.  The location
  634. -- is saved as a variable belonging to the field itself.
  635.  
  636.  
  637. on mouseUp
  638. -- put each card field back in its old location
  639. repeat with ii = 1 to 4
  640. put the ID of card fld ii into myID
  641. -- fetch the loc in the field's variable called "old location"
  642. put getVar(cd, myID, "old location") into old
  643. set the loc of card fld ii to old
  644. end repeat
  645. end mouseUp
  646.  
  647.  
  648. on mouseStillDown
  649. -- do not allow this button itself to be dragged
  650. end mouseStillDown
  651. </script>
  652.     </part>
  653.     <part>
  654.         <id>7</id>
  655.         <type>button</type>
  656.         <visible> <true /> </visible>
  657.         <reserved5> 0 </reserved5>
  658.         <reserved4> 0 </reserved4>
  659.         <reserved3> 0 </reserved3>
  660.         <reserved2> 0 </reserved2>
  661.         <reserved1> 0 </reserved1>
  662.         <enabled> <true /> </enabled>
  663.         <rect>
  664.             <left>17</left>
  665.             <top>314</top>
  666.             <right>132</right>
  667.             <bottom>338</bottom>
  668.         </rect>
  669.         <style>roundrect</style>
  670.         <showName> <true /> </showName>
  671.         <highlight> <false /> </highlight>
  672.         <autoHighlight> <true /> </autoHighlight>
  673.         <sharedHighlight> <true /> </sharedHighlight>
  674.         <family>0</family>
  675.         <titleWidth>0</titleWidth>
  676.         <icon>0</icon>
  677.         <textAlign>center</textAlign>
  678.         <font>Chicago</font>
  679.         <textSize>12</textSize>
  680.         <textStyle>plain</textStyle>
  681.         <name>Original Places</name>
  682.         <script>-- An example of how to use Instance Variables.  This script
  683. -- retrieves the original location of four card fields.
  684. -- The location is saved as a variable belonging to the field itself.
  685. -- (The original location value were put in from the message box.)
  686.  
  687.  
  688. on mouseUp
  689. -- put each card field back in its original location
  690. repeat with ii = 1 to 4
  691. put the ID of card fld ii into myID
  692. -- fetch the loc in the field's variable called "init location"
  693. put getVar(cd, myID, "init location") into old
  694. set the loc of card fld ii to old
  695. end repeat
  696. end mouseUp
  697.  
  698.  
  699. on mouseStillDown
  700. -- do not allow this button itself to be dragged
  701. end mouseStillDown
  702. </script>
  703.     </part>
  704.     <part>
  705.         <id>8</id>
  706.         <type>button</type>
  707.         <visible> <true /> </visible>
  708.         <reserved5> 0 </reserved5>
  709.         <reserved4> 0 </reserved4>
  710.         <reserved3> 0 </reserved3>
  711.         <reserved2> 0 </reserved2>
  712.         <reserved1> 0 </reserved1>
  713.         <enabled> <true /> </enabled>
  714.         <rect>
  715.             <left>136</left>
  716.             <top>307</top>
  717.             <right>168</right>
  718.             <bottom>339</bottom>
  719.         </rect>
  720.         <style>transparent</style>
  721.         <showName> <false /> </showName>
  722.         <highlight> <false /> </highlight>
  723.         <autoHighlight> <false /> </autoHighlight>
  724.         <sharedHighlight> <true /> </sharedHighlight>
  725.         <family>0</family>
  726.         <titleWidth>0</titleWidth>
  727.         <icon>0</icon>
  728.         <textAlign>center</textAlign>
  729.         <font>Chicago</font>
  730.         <textSize>12</textSize>
  731.         <textStyle>plain</textStyle>
  732.         <name>init remem</name>
  733.         <script>
  734.  
  735.  
  736. on mouseUpx  --disabled
  737. -- save the location of each card field
  738. repeat with ii = 1 to 4
  739. put the ID of card fld ii into myID
  740. putVar cd, myID, "init location", the loc of card fld ii
  741. end repeat
  742. end mouseUpx
  743.  
  744.  
  745.  
  746.  
  747.  
  748. on mouseStillDown
  749. end mouseStillDown</script>
  750.     </part>
  751.     <part>
  752.         <id>9</id>
  753.         <type>button</type>
  754.         <visible> <true /> </visible>
  755.         <reserved5> 0 </reserved5>
  756.         <reserved4> 0 </reserved4>
  757.         <reserved3> 0 </reserved3>
  758.         <reserved2> 0 </reserved2>
  759.         <reserved1> 0 </reserved1>
  760.         <enabled> <true /> </enabled>
  761.         <rect>
  762.             <left>210</left>
  763.             <top>276</top>
  764.             <right>237</right>
  765.             <bottom>301</bottom>
  766.         </rect>
  767.         <style>transparent</style>
  768.         <showName> <false /> </showName>
  769.         <highlight> <false /> </highlight>
  770.         <autoHighlight> <false /> </autoHighlight>
  771.         <sharedHighlight> <true /> </sharedHighlight>
  772.         <family>0</family>
  773.         <titleWidth>0</titleWidth>
  774.         <icon>1014</icon>
  775.         <textAlign>center</textAlign>
  776.         <font>Chicago</font>
  777.         <textSize>12</textSize>
  778.         <textStyle>plain</textStyle>
  779.         <name>Prev</name>
  780.         <script>on mouseUp
  781. visual effect wipe right
  782. go to previous card
  783. end mouseUp
  784. </script>
  785.     </part>
  786.     <part>
  787.         <id>10</id>
  788.         <type>button</type>
  789.         <visible> <true /> </visible>
  790.         <reserved5> 0 </reserved5>
  791.         <reserved4> 0 </reserved4>
  792.         <reserved3> 0 </reserved3>
  793.         <reserved2> 0 </reserved2>
  794.         <reserved1> 0 </reserved1>
  795.         <enabled> <true /> </enabled>
  796.         <rect>
  797.             <left>240</left>
  798.             <top>276</top>
  799.             <right>267</right>
  800.             <bottom>301</bottom>
  801.         </rect>
  802.         <style>transparent</style>
  803.         <showName> <false /> </showName>
  804.         <highlight> <false /> </highlight>
  805.         <autoHighlight> <false /> </autoHighlight>
  806.         <sharedHighlight> <true /> </sharedHighlight>
  807.         <family>0</family>
  808.         <titleWidth>0</titleWidth>
  809.         <icon>1013</icon>
  810.         <textAlign>center</textAlign>
  811.         <font>Chicago</font>
  812.         <textSize>12</textSize>
  813.         <textStyle>plain</textStyle>
  814.         <name>Next</name>
  815.         <script>on mouseUp
  816. visual effect wipe left
  817. go to next card
  818. end mouseUp
  819. </script>
  820.     </part>
  821.     <part>
  822.         <id>11</id>
  823.         <type>button</type>
  824.         <visible> <true /> </visible>
  825.         <reserved5> 0 </reserved5>
  826.         <reserved4> 0 </reserved4>
  827.         <reserved3> 0 </reserved3>
  828.         <reserved2> 0 </reserved2>
  829.         <reserved1> 0 </reserved1>
  830.         <enabled> <true /> </enabled>
  831.         <rect>
  832.             <left>284</left>
  833.             <top>270</top>
  834.             <right>318</right>
  835.             <bottom>303</bottom>
  836.         </rect>
  837.         <style>opaque</style>
  838.         <showName> <false /> </showName>
  839.         <highlight> <false /> </highlight>
  840.         <autoHighlight> <false /> </autoHighlight>
  841.         <sharedHighlight> <true /> </sharedHighlight>
  842.         <family>0</family>
  843.         <titleWidth>0</titleWidth>
  844.         <icon>0</icon>
  845.         <textAlign>center</textAlign>
  846.         <font>Chicago</font>
  847.         <textSize>12</textSize>
  848.         <textStyle>plain</textStyle>
  849.         <name></name>
  850.         <script></script>
  851.     </part>
  852.     <content>
  853.         <layer>background</layer>
  854.         <id>2</id>
  855.         <text>An Example:  "Cards" (they are fields) that you can drag around, then press remember.
  856.  
  857. Move them again, and press Jump Back.
  858.  
  859. They each remember their original location.</text>
  860.     </content>
  861.     <content>
  862.         <layer>card</layer>
  863.         <id>1</id>
  864.         <text>6
  865.    ¬Æ¬Æ¬Æ
  866.   ¬Æ¬Æ¬Æ
  867.            6</text>
  868.     </content>
  869.     <content>
  870.         <layer>card</layer>
  871.         <id>2</id>
  872.         <text>2
  873.        √ü
  874.    √ü
  875.           2</text>
  876.     </content>
  877.     <content>
  878.         <layer>card</layer>
  879.         <id>3</id>
  880.         <text>3
  881.      ‚Ñ¢
  882.   ‚Ñ¢  ‚Ñ¢
  883.           3</text>
  884.     </content>
  885.     <content>
  886.         <layer>card</layer>
  887.         <id>4</id>
  888.         <text>4
  889.    ¬©  ¬©
  890.    ¬©  ¬©
  891.            4</text>
  892.     </content>
  893.     <content>
  894.         <layer>background</layer>
  895.         <id>21</id>
  896.         <text>
  897. {old location{1{196,149}old location}1}
  898. {old location{2{305,91}old location}2}
  899. {old location{3{424,257}old location}3}
  900. {old location{4{466,257}old location}4}
  901. {init location{1{365,257}init location}1}
  902. {init location{2{394,257}init location}2}
  903. {init location{3{424,257}init location}3}
  904. {init location{4{466,257}init location}4}</text>
  905.     </content>
  906.     <name></name>
  907.     <script>on fix
  908. repeat with ii = 1 to 4
  909. set locktext of card fld ii to true
  910. end repeat
  911. end fix
  912.  
  913. on mouseStillDown
  914. if the name of the target contains "field"
  915. then set the loc of the target to the mouseLoc
  916. end mouseStillDown
  917.  
  918. on mouseDown
  919. end mouseDown</script>
  920. </card>
  921.  
  922.  
  923. card_7669.xml
  924. <?xml version="1.0" encoding="utf-8" ?>
  925. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  926. <card>
  927.     <id>7669</id>
  928.     <filler1>0</filler1>
  929.     <cantDelete> <false /> </cantDelete>
  930.     <showPict> <true /> </showPict>
  931.     <dontSearch> <false /> </dontSearch>
  932.     <owner>2801</owner>
  933.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  934.     <content>
  935.         <layer>background</layer>
  936.         <id>2</id>
  937.         <text>This offering is a stack script that allows you to have instance variables in any HyperCard object.
  938.  
  939. As many variables as you want in each object.  Any value allowed in a nornal HC variable.  Any name you want.  Spaces OK.
  940.  
  941. Values stay when you quit HC.  Stay with stack when you drag it to another disk.</text>
  942.     </content>
  943.     <name></name>
  944.     <script></script>
  945. </card>
  946.  
  947.  
  948. card_7375.xml
  949. <?xml version="1.0" encoding="utf-8" ?>
  950. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  951. <card>
  952.     <id>7375</id>
  953.     <filler1>0</filler1>
  954.     <cantDelete> <false /> </cantDelete>
  955.     <showPict> <true /> </showPict>
  956.     <dontSearch> <false /> </dontSearch>
  957.     <owner>2801</owner>
  958.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  959.     <content>
  960.         <layer>background</layer>
  961.         <id>2</id>
  962.         <text>Kinds of variables in HyperCard
  963.  
  964. > local variables in scripts
  965.        (gone after script done)
  966. > global variables
  967.        (gone when quit stack, must have 
  968.         different names, all in one space)
  969. > values in fields.  Can be hidden.
  970.        (have to keep creating fields, can not
  971.         attach to buttons or other fields)</text>
  972.     </content>
  973.     <name></name>
  974.     <script></script>
  975. </card>
  976.  
  977.  
  978. card_6946.xml
  979. <?xml version="1.0" encoding="utf-8" ?>
  980. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  981. <card>
  982.     <id>6946</id>
  983.     <filler1>0</filler1>
  984.     <cantDelete> <false /> </cantDelete>
  985.     <showPict> <true /> </showPict>
  986.     <dontSearch> <false /> </dontSearch>
  987.     <owner>2801</owner>
  988.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  989.     <part>
  990.         <id>1</id>
  991.         <type>button</type>
  992.         <visible> <true /> </visible>
  993.         <reserved5> 0 </reserved5>
  994.         <reserved4> 0 </reserved4>
  995.         <reserved3> 0 </reserved3>
  996.         <reserved2> 0 </reserved2>
  997.         <reserved1> 0 </reserved1>
  998.         <enabled> <true /> </enabled>
  999.         <rect>
  1000.             <left>194</left>
  1001.             <top>12</top>
  1002.             <right>271</right>
  1003.             <bottom>64</bottom>
  1004.         </rect>
  1005.         <style>rectangle</style>
  1006.         <showName> <true /> </showName>
  1007.         <highlight> <false /> </highlight>
  1008.         <autoHighlight> <true /> </autoHighlight>
  1009.         <sharedHighlight> <true /> </sharedHighlight>
  1010.         <family>0</family>
  1011.         <titleWidth>0</titleWidth>
  1012.         <icon>11260</icon>
  1013.         <textAlign>center</textAlign>
  1014.         <font>Chicago</font>
  1015.         <textSize>12</textSize>
  1016.         <textStyle>plain</textStyle>
  1017.         <name>Old Train Set</name>
  1018.         <script>on mouseUp
  1019. set cursor to watch -- for the slower machines
  1020. go to stack "Train Set" -- ‚àÜ
  1021. end mouseUp
  1022.  
  1023. </script>
  1024.     </part>
  1025.     <content>
  1026.         <layer>background</layer>
  1027.         <id>2</id>
  1028.         <text>In the HyperCard train set, it would be nice to have variables that belong to the Engine.  Could have two engines.  Script could be much simpler.  
  1029.  
  1030. Instance variables like any Smalltalk or  Common Lisp Object System.</text>
  1031.     </content>
  1032.     <name></name>
  1033.     <script></script>
  1034. </card>
  1035.  
  1036.  
  1037. card_3026.xml
  1038. <?xml version="1.0" encoding="utf-8" ?>
  1039. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  1040. <card>
  1041.     <id>3026</id>
  1042.     <filler1>0</filler1>
  1043.     <cantDelete> <false /> </cantDelete>
  1044.     <showPict> <true /> </showPict>
  1045.     <dontSearch> <false /> </dontSearch>
  1046.     <owner>2801</owner>
  1047.     <link rel="stylesheet" type="text/css" href="stylesheet_5301.css" />
  1048.     <content>
  1049.         <layer>background</layer>
  1050.         <id>2</id>
  1051.         <text><span class="style1"></span><span class="style4">Instance Variables for buttons, fields, cards, and backgrounds 
  1052. </span><span class="style1">
  1053. Ted Kaehler, Apple Computer
  1054.  
  1055.  
  1056.  
  1057. ¬© Apple Computer, 1992.</span></text>
  1058.     </content>
  1059.     <name></name>
  1060.     <script></script>
  1061. </card>
  1062.  
  1063.  
  1064.